﻿@model IEnumerable<shop.DanhMuc>
@foreach(var item in Model )
{
     if(ViewBag.ty =="1")
     {
       <option  value="@item.MaDM" > --@item.DanhMuc1</option>   
         
     }
     else
     {
         if(item.MaDM == ViewBag.MaDM)
         {
              <option selected="selected"  value="@item.MaDM" > --@item.DanhMuc1</option>
         }
         
         else
         {
              <option  value="@item.MaDM" >--@item.DanhMuc1</option>
         }
     }
   
}